//
//  MySubscribeSortCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/29.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "MySubscribeSortCell.h"

@implementation MySubscribeSortCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(ProClassificationModel *)model {
    
    self.itemCategoryLab.text = model.parentName;
    
    if (model.isSelect) {
        self.itemCategoryLab.textColor = UIColorHex(0xffffff);
        self.itemCategoryLab.layer.backgroundColor = UIColorHex(0xff4242).CGColor;
    } else {
        self.itemCategoryLab.textColor = UIColorHex(0x333333);
        self.itemCategoryLab.layer.backgroundColor = UIColorHex(0xf1f1f1).CGColor;
    }
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        [self pp_clipCorners:UIRectCornerAllCorners radius:self.frame.size.height/2];
    });
}

@end
